package model

import (
	"gorm.io/gorm"
	"time"
)

type ExamNum struct {
	Id         uint           `gorm:"column:id;type:bigint(20) UNSIGNED;primaryKey;not null;" json:"id"`
	UserId     uint           `gorm:"column:user_id;type:bigint(20) UNSIGNED;comment:学生Id;not null;default:0;" json:"user_id"`            // 学生Id
	ExamId     uint           `gorm:"column:exam_id;type:bigint(20) UNSIGNED;comment:考试Id;not null;default:0;" json:"exam_id"`            // 考试Id
	ExamNumber uint           `gorm:"column:exam_number;type:bigint(20) UNSIGNED;comment:考试分数;not null;" json:"exam_number"`              // 考试分数
	CreatedAt  time.Time      `gorm:"column:created_at;type:datetime;comment:创建时间;not null;default:CURRENT_TIMESTAMP;" json:"created_at"` // 创建时间
	DeletedAt  gorm.DeletedAt `gorm:"column:deleted_at;type:datetime;comment:删除时间;default:NULL;" json:"deleted_at"`                       // 删除时间
}

func (ExamNum) TableName() string {
	return "exam_num"
}
